package devrule

import "yundian/internel/pkg/dingo"

type DeviceRuleAttr func(model *DeviceRulesModel)

type DeviceRuleAttrs []DeviceRuleAttr

func (attrFunc DeviceRuleAttrs) Apply(model *DeviceRulesModel)  {
	for _,f := range attrFunc {
		f(model)
	}
}

func WithCreateAt(createAt dingo.Time) DeviceRuleAttr {
	return func(model *DeviceRulesModel) { model.CreateAt = createAt }
}

func WithUpdateAt(updateAt dingo.Time) DeviceRuleAttr {
	return func(model *DeviceRulesModel) { model.UpdateAt = updateAt }
}


